<template>
  <!-- 大客户项目报备管理  -审批明细-->
  <div class="wrapper">
    <Anchor :labelList="labels" activeId="row-01" labelWidth="130">
      <div class="line" id="row-01">
        <BasicInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-02">
        <ProjectInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-03">
        <OpponentInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-04">
        <ContactInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-05">
        <CarInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-08">
        <ImageInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-06">
        <HistoryInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-07">
        <FailureInfo v-model="value" :infoBasic="infoType" />
      </div>
    </Anchor>
    <div class="dialogBottmView">
      <el-button @click="closeDialog">关 闭</el-button>
    </div>
  </div>
</template>

<script>
import { getDealerCompanyByCode } from '@/api/common/org/dealerCompany';
import { authority } from '@/utils/authMixin';
import { dictionary } from '@/utils/dictMixin';
import BasicInfo from '../../approvalManage/approvalDetails/infoBase'; //基本信息
import ProjectInfo from '../../approvalManage/approvalDetails/infoProject'; //项目信息
import OpponentInfo from '../../approvalManage/approvalDetails/infoOpponent'; //竞争对手
import ContactInfo from '../../approvalManage/approvalDetails/infoContact'; //联系人信息
import CarInfo from './infoCar'; //意向车型需求信息
import HistoryInfo from './infoHistory'; //意向车型需求信息
import FailureInfo from './infoFailure'; //意向车型需求信息
import ImageInfo from './infoImage'; //意向车型需求信息

export default {
  name: 'DealerCompany',
  mixins: [authority, dictionary],
  components: {
    BasicInfo,
    ProjectInfo,
    OpponentInfo,
    ContactInfo,
    HistoryInfo,
    FailureInfo,
    CarInfo,ImageInfo
  },
  props: {
    value: {
      type: Number,
      required: true
    },
    infoType: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      labels: [
        { title: '基本信息', id: 'row-01' },
        { title: '项目信息', id: 'row-02' },
        { title: '竞争对手分析', id: 'row-03' },
        { title: '联系人信息', id: 'row-04' },
        { title: '意向车型需求信息', id: 'row-05' },
        { title: '附件', id: 'row-08' },
        { title: '跟进历史', id: 'row-06' },
        { title: '战败/延续记录', id: 'row-07' }
      ],
      formData: {}
    };
  },
  methods: {
    //保存
    saveDialog() {
      this.$emit('close', { visible: false });
    },
    //取消操作
    closeDialog() {
      this.$emit('close', { visible: false });
    }
  }
};
</script>

<style scoped>
.wrapper {
  height: calc(100vh - 110px);
}
</style>
